3.902 \(\int \frac {\sec (c+d x) (A+B \sec (c+d x)+C \sec ^2(c+d x))}{a+b \sec (c+d x)} \, dx\)
Optimal. Leaf size=106 \[ \frac {2 \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^2 d \sqrt {a-b} \sqrt {a+b}}+\frac {(b B-a C) \tanh ^{-1}(\sin (c+d x))}{b^2 d}+\frac {C \tan (c+d x)}{b d} \]
[Out]
(B*b-C*a)*arctanh(sin(d*x+c))/b^2/d+2*(A*b^2-a*(B*b-C*a))*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/
b^2/d/(a-b)^(1/2)/(a+b)^(1/2)+C*tan(d*x+c)/b/d
________________________________________________________________________________________
Rubi [A] time = 0.22, antiderivative size = 106, normalized size of antiderivative = 1.00,
number of steps used = 6, number of rules used = 6, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used =
{4082, 3998, 3770, 3831, 2659, 208} \[ \frac {2 \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^2 d \sqrt {a-b} \sqrt {a+b}}+\frac {(b B-a C) \tanh ^{-1}(\sin (c+d x))}{b^2 d}+\frac {C \tan (c+d x)}{b d} \]
Antiderivative was successfully verified.
[In]
Int[(Sec[c + d*x]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]),x]
[Out]
((b*B - a*C)*ArcTanh[Sin[c + d*x]])/(b^2*d) + (2*(A*b^2 - a*(b*B - a*C))*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2]
)/Sqrt[a + b]])/(Sqrt[a - b]*b^2*Sqrt[a + b]*d) + (C*Tan[c + d*x])/(b*d)
Rule 208
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]
Rule 2659
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 3770
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rule 3831
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[1/(1 + (a*Sin[e
+ f*x])/b), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Rule 3998
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x
_Symbol] :> Dist[B/b, Int[Csc[e + f*x], x], x] + Dist[(A*b - a*B)/b, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x]
, x] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0]
Rule 4082
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_
.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Simp[(C*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1))/(b*f*(m
+ 2)), x] + Dist[1/(b*(m + 2)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[b*A*(m + 2) + b*C*(m + 1) + (b*B*
(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Rubi steps
\begin {align*} \int \frac {\sec (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx &=\frac {C \tan (c+d x)}{b d}+\frac {\int \frac {\sec (c+d x) (A b+(b B-a C) \sec (c+d x))}{a+b \sec (c+d x)} \, dx}{b}\\ &=\frac {C \tan (c+d x)}{b d}+\frac {(b B-a C) \int \sec (c+d x) \, dx}{b^2}+\left (A-\frac {a (b B-a C)}{b^2}\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)} \, dx\\ &=\frac {(b B-a C) \tanh ^{-1}(\sin (c+d x))}{b^2 d}+\frac {C \tan (c+d x)}{b d}+\frac {\left (A-\frac {a (b B-a C)}{b^2}\right ) \int \frac {1}{1+\frac {a \cos (c+d x)}{b}} \, dx}{b}\\ &=\frac {(b B-a C) \tanh ^{-1}(\sin (c+d x))}{b^2 d}+\frac {C \tan (c+d x)}{b d}+\frac {\left (2 \left (A b^2-a (b B-a C)\right )\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{b^3 d}\\ &=\frac {(b B-a C) \tanh ^{-1}(\sin (c+d x))}{b^2 d}+\frac {2 \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} b^2 \sqrt {a+b} d}+\frac {C \tan (c+d x)}{b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 2.64, size = 365, normalized size = 3.44 \[ \frac {2 \cos (c+d x) (a \cos (c+d x)+b) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (-\frac {2 i (\cos (c)-i \sin (c)) \left (a (a C-b B)+A b^2\right ) \tan ^{-1}\left (\frac {(\sin (c)+i \cos (c)) \left (\tan \left (\frac {d x}{2}\right ) (a \cos (c)-b)+a \sin (c)\right )}{\sqrt {a^2-b^2} \sqrt {(\cos (c)-i \sin (c))^2}}\right )}{\sqrt {a^2-b^2} \sqrt {(\cos (c)-i \sin (c))^2}}-\left ((b B-a C) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+(b B-a C) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+\frac {b C \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {b C \sin \left (\frac {d x}{2}\right )}{\left (\sin \left (\frac {c}{2}\right )+\cos \left (\frac {c}{2}\right )\right ) \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{b^2 d (a+b \sec (c+d x)) (A \cos (2 (c+d x))+A+2 B \cos (c+d x)+2 C)} \]
Antiderivative was successfully verified.
[In]
Integrate[(Sec[c + d*x]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]),x]
[Out]
(2*Cos[c + d*x]*(b + a*Cos[c + d*x])*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(-((b*B - a*C)*Log[Cos[(c + d*x)/
2] - Sin[(c + d*x)/2]]) + (b*B - a*C)*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - ((2*I)*(A*b^2 + a*(-(b*B) + a
*C))*ArcTan[((I*Cos[c] + Sin[c])*(a*Sin[c] + (-b + a*Cos[c])*Tan[(d*x)/2]))/(Sqrt[a^2 - b^2]*Sqrt[(Cos[c] - I*
Sin[c])^2])]*(Cos[c] - I*Sin[c]))/(Sqrt[a^2 - b^2]*Sqrt[(Cos[c] - I*Sin[c])^2]) + (b*C*Sin[(d*x)/2])/((Cos[c/2
] - Sin[c/2])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])) + (b*C*Sin[(d*x)/2])/((Cos[c/2] + Sin[c/2])*(Cos[(c + d*x
)/2] + Sin[(c + d*x)/2]))))/(b^2*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*(c + d*x)])*(a + b*Sec[c + d*x]))
________________________________________________________________________________________
fricas [B] time = 6.52, size = 482, normalized size = 4.55 \[ \left [\frac {{\left (C a^{2} - B a b + A b^{2}\right )} \sqrt {a^{2} - b^{2}} \cos \left (d x + c\right ) \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) - {\left (C a^{3} - B a^{2} b - C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (C a^{3} - B a^{2} b - C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (C a^{2} b - C b^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{2} b^{2} - b^{4}\right )} d \cos \left (d x + c\right )}, \frac {2 \, {\left (C a^{2} - B a b + A b^{2}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) \cos \left (d x + c\right ) - {\left (C a^{3} - B a^{2} b - C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (C a^{3} - B a^{2} b - C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (C a^{2} b - C b^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{2} b^{2} - b^{4}\right )} d \cos \left (d x + c\right )}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="fricas")
[Out]
[1/2*((C*a^2 - B*a*b + A*b^2)*sqrt(a^2 - b^2)*cos(d*x + c)*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c
)^2 + 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x +
c) + b^2)) - (C*a^3 - B*a^2*b - C*a*b^2 + B*b^3)*cos(d*x + c)*log(sin(d*x + c) + 1) + (C*a^3 - B*a^2*b - C*a*
b^2 + B*b^3)*cos(d*x + c)*log(-sin(d*x + c) + 1) + 2*(C*a^2*b - C*b^3)*sin(d*x + c))/((a^2*b^2 - b^4)*d*cos(d*
x + c)), 1/2*(2*(C*a^2 - B*a*b + A*b^2)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 -
b^2)*sin(d*x + c)))*cos(d*x + c) - (C*a^3 - B*a^2*b - C*a*b^2 + B*b^3)*cos(d*x + c)*log(sin(d*x + c) + 1) + (
C*a^3 - B*a^2*b - C*a*b^2 + B*b^3)*cos(d*x + c)*log(-sin(d*x + c) + 1) + 2*(C*a^2*b - C*b^3)*sin(d*x + c))/((a
^2*b^2 - b^4)*d*cos(d*x + c))]
________________________________________________________________________________________
giac [A] time = 0.30, size = 180, normalized size = 1.70 \[ -\frac {\frac {{\left (C a - B b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{2}} - \frac {{\left (C a - B b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{2}} + \frac {2 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} b} + \frac {2 \, {\left (C a^{2} - B a b + A b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{\sqrt {-a^{2} + b^{2}} b^{2}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="giac")
[Out]
-((C*a - B*b)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/b^2 - (C*a - B*b)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/b^2 + 2*
C*tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 - 1)*b) + 2*(C*a^2 - B*a*b + A*b^2)*(pi*floor(1/2*(d*x + c)/pi
+ 1/2)*sgn(2*a - 2*b) + arctan((a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/(sqrt(-a^
2 + b^2)*b^2))/d
________________________________________________________________________________________
maple [B] time = 0.62, size = 272, normalized size = 2.57 \[ \frac {2 \arctanh \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a -b \right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right ) A}{d \sqrt {\left (a -b \right ) \left (a +b \right )}}-\frac {2 a \arctanh \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a -b \right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right ) B}{d b \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {2 a^{2} \arctanh \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a -b \right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right ) C}{d \,b^{2} \sqrt {\left (a -b \right ) \left (a +b \right )}}-\frac {C}{d b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) B}{d b}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) C a}{d \,b^{2}}-\frac {C}{d b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) B}{d b}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) C a}{d \,b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(sec(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x)
[Out]
2/d/((a-b)*(a+b))^(1/2)*arctanh(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2))*A-2/d*a/b/((a-b)*(a+b))^(1/2)*ar
ctanh(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2))*B+2/d*a^2/b^2/((a-b)*(a+b))^(1/2)*arctanh(tan(1/2*d*x+1/2*
c)*(a-b)/((a-b)*(a+b))^(1/2))*C-1/d/b/(tan(1/2*d*x+1/2*c)-1)*C-1/d/b*ln(tan(1/2*d*x+1/2*c)-1)*B+1/d/b^2*ln(tan
(1/2*d*x+1/2*c)-1)*C*a-1/d/b/(tan(1/2*d*x+1/2*c)+1)*C+1/d/b*ln(tan(1/2*d*x+1/2*c)+1)*B-1/d/b^2*ln(tan(1/2*d*x+
1/2*c)+1)*C*a
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?`
for more details)Is 4*a^2-4*b^2 positive or negative?
________________________________________________________________________________________
mupad [B] time = 11.16, size = 3452, normalized size = 32.57 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((A + B/cos(c + d*x) + C/cos(c + d*x)^2)/(cos(c + d*x)*(a + b/cos(c + d*x))),x)
[Out]
- (atan(-(((B*b - C*a)*(((B*b - C*a)*((32*(A*b^7 + B*b^7 + A*a^2*b^5 + B*a^2*b^5 + 2*C*a^2*b^5 - C*a^3*b^4 - 2
*A*a*b^6 - 2*B*a*b^6 - C*a*b^6))/b^3 - (32*tan(c/2 + (d*x)/2)*(B*b - C*a)*(2*a*b^6 - 4*a^2*b^5 + 2*a^3*b^4))/b
^4))/b^2 - (32*tan(c/2 + (d*x)/2)*(A^2*b^5 + B^2*b^5 - 2*C^2*a^5 - A^2*a*b^4 - 3*B^2*a*b^4 + 4*C^2*a^4*b + 4*B
^2*a^2*b^3 - 2*B^2*a^3*b^2 + C^2*a^2*b^3 - 3*C^2*a^3*b^2 - 2*A*B*a*b^4 - 2*B*C*a*b^4 + 4*B*C*a^4*b + 2*A*B*a^2
*b^3 + 2*A*C*a^2*b^3 - 2*A*C*a^3*b^2 + 6*B*C*a^2*b^3 - 8*B*C*a^3*b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2*A*C*a^2*b^3 - 2*A*C*a^3*b^2 + 6*B*C*a^2*b^3 - 8*B*C*a^3*
b^2))/b^2 - (((a + b)*(a - b))^(1/2)*((32*(A*b^7 + B*b^7 + A*a^2*b^5 + B*a^2*b^5 + 2*C*a^2*b^5 - C*a^3*b^4 - 2
*A*a*b^6 - 2*B*a*b^6 - C*a*b^6))/b^3 - (32*tan(c/2 + (d*x)/2)*((a + b)*(a - b))^(1/2)*(A*b^2 + C*a^2 - B*a*b)*
(2*a*b^6 - 4*a^2*b^5 + 2*a^3*b^4))/(b^2*(b^4 - a^2*b^2)))*(A*b^2 + C*a^2 - B*a*b))/(b^4 - a^2*b^2))*(A*b^2 + C
*a^2 - B*a*b))/(b^4 - a^2*b^2)))*((a + b)*(a - b))^(1/2)*(A*b^2 + C*a^2 - B*a*b)*2i)/(d*(b^4 - a^2*b^2)) - (2*
C*tan(c/2 + (d*x)/2))/(b*d*(tan(c/2 + (d*x)/2)^2 - 1))
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)*(A+B*sec(d*x+c)+C*sec(d*x+c)**2)/(a+b*sec(d*x+c)),x)
[Out]
Integral((A + B*sec(c + d*x) + C*sec(c + d*x)**2)*sec(c + d*x)/(a + b*sec(c + d*x)), x)
________________________________________________________________________________________